home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / System / DEF / Utilities / Array Primitives / aref next >
Lisp/Scheme  |  1998-10-23  |  250b  |  17 lines

  1. aref vector position
  2.  
  3. Returns the value withing a vector in position.
  4.  
  5. (setq vector (make-array 10))
  6. --> #(nil nil nil nil nil nil nil nil nil nil)
  7.  
  8. (putv vector 0 1)
  9. --> 1
  10.  
  11. (aref vector 0)
  12. --> 1
  13.  
  14. vector
  15. --> #(1 nil nil nil nil nil nil nil nil nil)
  16.  
  17.